﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;

namespace McMySkin_Installer
{
    public partial class SettingForm : NewForm
    {
        public SettingForm()
        {
            InitializeComponent();
        }

        private void SettingForm_Load(object sender, EventArgs e)
        {
            checkBox1.Checked = Config.createBackup;
            checkBox3.Checked = Config.createLog;
            checkBox4.Checked = Config.debug;
            textBox1.Text = Config.customURL;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void checkBox3_CheckedChanged(object sender, EventArgs e)
        {
            
        }

        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            MessageBox.Show("使用更准确的替换模式，能够支持原版、MMS、SM以外的皮肤站的替换","高级安装。(正在开发中)",MessageBoxButtons.OK,MessageBoxIcon.Information);
        }

        private void checkBox4_CheckedChanged(object sender, EventArgs e)
        {
            button3.Enabled = checkBox4.Checked;
        }

        private void button3_Click(object sender, EventArgs e)
        {
            new DebugForm().Show();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Config.createBackup = checkBox1.Checked;
            Config.createLog = checkBox3.Checked;
            Config.debug = checkBox4.Checked;
            Config.customURL = textBox1.Text;
            this.Close();
        }

        private void pictureBox1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void pictureBox1_MouseEnter(object sender, EventArgs e)
        {
            pictureBox1.BackgroundImage = global::McMySkin_Installer.Properties.Resources.closeOnMouse;
        }

        private void pictureBox1_MouseLeave(object sender, EventArgs e)
        {
            pictureBox1.BackgroundImage = global::McMySkin_Installer.Properties.Resources.close;
        }

        private void label3_Click(object sender, EventArgs e)
        {

        }
    }
}
